package com.tjl.warehouse.service;

import com.tjl.warehouse.model.MyPage;
import com.tjl.warehouse.model.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tjl.warehouse.model.dto.AssignRoleReq;

import java.util.List;

/**
* @author Tang
* @description 针对表【user_info(用户表)】的数据库操作Service
* @createDate 2024-05-10 19:26:22
*/
public interface UserInfoService extends IService<UserInfo> {

    UserInfo login(String userCode, String userPwd);

    MyPage<UserInfo> getUserPage(UserInfo userInfo,MyPage<UserInfo> myPage);

    /**
     * 分配角色
     * @param assignRole
     * @return 是否更新成功
     */
    boolean updateUserRole(AssignRoleReq assignRole);

    boolean addUser(UserInfo userInfo,Integer createBy);

    boolean updateUser(UserInfo userInfo,Integer updateBy);

    //检查用户是否存在
    boolean isExist(Integer userId,String userCode);
}
